package jmine.tec.result;

import bancosys.tec.exception.AbstractRuntimeException;
import bancosys.tec.exception.LocalizedMessageHolder;
import bancosys.tec.exception.MessageHolder;

/**
 * Exception para a api de resultados.
 * 
 * @author jrenaut
 */
public class ResultException extends AbstractRuntimeException {

    private static final String JMINE_TEC_AOP_UTILS_MESSAGES = "jmine-tec-aop-utils-messages";

    /**
     * C'tor
     * 
     * @param messageHolder {@link LocalizedMessageHolder}
     * @param cause {@link Throwable}
     */
    public ResultException(LocalizedMessageHolder messageHolder, Throwable cause) {
        super(messageHolder, cause);
    }

    /**
     * C'tor
     * 
     * @param messageHolder {@link LocalizedMessageHolder}
     */
    public ResultException(LocalizedMessageHolder messageHolder) {
        super(messageHolder);
    }

    /**
     * C'tor
     * 
     * @param key String
     * @param arguments Object[]
     * @deprecated use LocalizedMessageHolder
     */
    @Deprecated
    public ResultException(String key, Object... arguments) {
        this(new MessageHolder(JMINE_TEC_AOP_UTILS_MESSAGES, key, arguments));
    }

    /**
     * C'tor
     * 
     * @param key String
     * @param cause Cause
     * @param arguments Object[]
     * @deprecated use LocalizedMessageHolder
     */
    @Deprecated
    public ResultException(String key, Throwable cause, Object... arguments) {
        this(new MessageHolder(JMINE_TEC_AOP_UTILS_MESSAGES, key, arguments), cause);
    }

}
